import { _decorator, Component, Node } from 'cc';
import { ECPosition, ECPositionHelper } from './ecs/ext/components/ECPosition';
import { Component as ECSComponent } from './ecs/core/Component';
import { World } from './ecs/core/World';
const { ccclass, property } = _decorator;

@ccclass('TestEntry')
export class TestEntry extends Component {
    private _world: World;
    start() {
        // FixedMathTest.runAllTests();
        this._world = new World();
        const entity = this._world.addEntity((entity) => {
            ECPositionHelper.setPosition(entity, 100, 100, 0);
        });

        const entity2 = this._world.addEntity((entity) => {
            ECPositionHelper.setPosition(entity, 200, 200, 0);
        });
        
        
    }

    update(deltaTime: number) {
        this._world.update(deltaTime);
    }
}


